class Person:
    def __init__(self,name,weight):
        self.name=name
        self.weight=weight
    def __str__(self):
        return f'姓名：{self.name},体重:{self.weight}'
    def run(self):
        print(f'{self.name}跑不了，体重减少了')
        self.weight-=0.5
    def eat(self):
        print(f'{self.weight}大吃一餐，体重增加了')
        self.weight+=1

xm=Person('小明',75.0)
print(xm)
xm.run()
xm.eat()
print(xm)




